<?php

namespace Analysis\Model;

use Think\Model;

class PreftypeModel extends Model
{
    protected $_validate = array(
        array('pre_type', 'checkReturnVal', '请选择正确的推广类型', 0, 'callback'),
        array('pre_status', 'checkReturnVal', '请选择正确的状态类型', 0, 'callback'),
    );
    
    protected $_auto = array(
        array('pre_time','time',3,'function'),
    );
    
    protected function checkReturnVal($data)
    {
        return $data == 0 ? false : true;
    }
}
